#!/usr/bin/perl -w
use strict;
use warnings;
use DBI;
require('config.pl');

my $db_conn = DBI->connect("DBI:mysql:database=phone_num_search;host=$ENV{'db_host'}", $ENV{'db_user'}, $ENV{'db_password'});
$db_conn->do('set names utf8');
open IN, "cut -f 1 data/baidu_wap_spider | ";
while (<IN>) {
	chomp;
	$db_conn->do("replace into downloaded_phone_num(phone_num) values($_)");
}
close IN;
